package lesson11;


import com.example.workshop.Filter;
import lesson9.Movie;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import java.util.logging.Logger;

@Component
//@Qualifier("CBF")
public class ContentBasedFilter  implements Filter {

    private Logger logger= (Logger) LoggerFactory.getLogger(this.getClass());

    public ContentBasedFilter(){
        super();
        logger.info("In ContentBasedFilter constructor method");
    }

    @PostConstruct
    public void postConstruct(){
        logger.info("In RecommenderImplementation postConstruct method");
    }

    @PreDestroy
    private void preDestroy(){
        logger.info("In ContentBasedFilter preDestroy method");
    }


    public String[] getRecommendations(String movie){
        return new String[] {"Happy Feet","Ice Age","Shark Tale"};
    }
}